<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>test</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <link href="https://cdn.staticfile.org/ionic/1.3.2/css/ionic.css" rel="stylesheet">
    <link href="/resources/css/common/common.css" rel="stylesheet">
    <script src="https://cdn.staticfile.org/ionic/1.3.2/js/ionic.bundle.min.js"></script>
    <script src="/resources/js/main/register.js"></script>
</head>
<body ng-app="jie">

<ion-header-bar>
    <div class="row app-header">
        <div class="col-33 text-left ttt">
            <i class="icon ion-home"></i>
        </div>

        <div class="col-33 text-center">
            <span>绿色家园</span>
        </div>

        <div class="col-33 text-right">
            <div class="row">
                <div class="edit-btn col-33 col-offset-33" >
                    <i class="icon ion-compose" on-tap="editContent()"></i>
                </div>
                <div class="more-btn col-33">
                    <i class="icon ion-more"></i>
                </div>
            </div>
        </div>
    </div>
</ion-header-bar>

<ion-content>
   <form name="registerForm" class="list" method="post" action="/jie/register/save" novalidate ng-submit="submit()" onsubmit="return false" ng-controller="RegisterController">
       <label class="item item-input">
           <span class="input-label">昵称</span>
           <input type="text" name="nickName" placeholder="昵称" ng-model="nickName" ng-maxlength="10" required>
           <span style="color: red" ng-show="registerForm.nickName.$dirty && registerForm.nickName.$invalid">
               <span ng-show="registerForm.nickName.$error.required">必填</span>
               <span ng-show="registerForm.nickName.$error.maxlength">最多10字符</span>
           </span>
       </label>

       <label class="item item-input">
           <span class="input-label">宣言</span>
           <input type="text" name="mark" placeholder="宣言" ng-model="mark" ng-maxlength="30" required>
           <span style="color: red" ng-show="registerForm.mark.$dirty && registerForm.mark.$invalid">
               <span ng-show="registerForm.mark.$error.required">必填</span>
               <span ng-show="registerForm.mark.$error.maxlength">最多30字符</span>
           </span>
       </label>

       <label class="item item-input">
           <span class="input-label">撸龄</span>
           <input type="text" name="history" placeholder="多少年" ng-model="history" required ng-pattern="/^[0-9]*$/">
           <span style="color: red" ng-show="registerForm.history.$dirty && registerForm.history.$invalid">
               <span ng-show="registerForm.history.$error.required">必填</span>
               <span ng-show="registerForm.history.$error.pattern">0-100正整数</span>
           </span>
       </label>

       <label class="item item-input">
           <span class="input-label">邮箱</span>
           <input type="email" name="email" placeholder="用于密码找回，可不填" ng-model="email" ng-maxlength="100">
           <span style="color: red" ng-show="registerForm.email.$dirty && registerForm.email.$invalid">
               <span ng-show="registerForm.email.$error.email">邮箱地址</span>
               <span ng-show="registerForm.history.$error.maxlength">过长</span>
           </span>
       </label>

       <label class="item item-input">
           <span class="input-label">密码</span>
           <input type="password" name="password" placeholder="******" required ng-model="password" ng-maxlength="16" ng-minlength="3" ng-pattern="/^[a-zA-z0-9_@]*$/">
           <span style="color: red" ng-show="registerForm.password.$dirty && registerForm.password.$invalid">
               <span ng-show="registerForm.password.$error.required">必填</span>
               <span ng-show="registerForm.password.$error.maxlength">过长</span>
               <span ng-show="registerForm.password.$error.minlength">过短</span>
               <span ng-show="registerForm.password.$error.pattern">特殊字符</span>
           </span>
       </label>

       <label class="item item-input">
           <span class="input-label">确认密码</span>
           <input type="password" name="repassword" placeholder="******" required ng-model="repassword">
           <span style="color: red" ng-show="registerForm.repassword.$dirty">
               <span ng-show="repassword != password">不一致</span>
           </span>
       </label>

       <div class="text-center">
           <button type="submit" class="button button-calm" style="width: 90%; margin: 20px auto;"
                   ng-disabled="registerForm.nickName.$invalid || registerForm.mark.$invalid || registerForm.history.$invalid ||
                   registerForm.eamil.$invalid || registerForm.password.$invalid || repassword!=password">注册
           </button>
       </div>


   </form>

</ion-content>

</body>

</html>